package com.ybb.controller;

import com.ybb.stock.service.GoodsStockService;
import com.ybb.stock.vo.StockChangeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MerchantController {

    @Autowired
    private GoodsStockService stockService;

    /**
     * 商品入库
     */
    @PostMapping("/api/merchant/{code}/stock")
    public void putInStockGoods(@PathVariable("code") String merchant, @RequestBody StockChangeVo stockChange){
        stockService.putInStockGoods(merchant, stockChange);
    }
}
